Joined: Sep 2001
Posts: 8
Junior Member
Junior Member
Joined: Sep 2001
Posts: 8
This is Sleepy's Hack "ViewPMreply"
#############################
# Sleepy custom hack
#
# To view PM when replying
#
# ###########################
#
# Only 2 files need changing
#
# public_pm_form.pl & ubb_pm.cgi
#
############################
###################
#OPEN public_pm_form.pl
###################
#find
###################
print<
$TBB NearBottom ################# # replace with ################# print<$TBB $i_frame NearBottom ################# # save and exit ################# # open ubb_pm.cgi ################# # find ################# sub pm_reply { local(%pm_user_index, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field); ################ # replace ################ sub pm_reply { local(%pm_user_index, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, $i_frame, $i_frame_alt, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field); ############### # find ############### # get pm topic! if (-e "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi") { require "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi"; } else { &StandardHTML("$vars_wordlets_err{no_such_pm}"); } ############### #Below that ADD ############### # set topic viewer: $go_to = "$vars_config{CGIURL}/ultimatebb.cgi?ubb=get_pm&d=$in{d}&t=$in{t}"; $i_frame_alt = &build_topic_review; if ($vars_display{InlineFrame} eq 'TRUE') { $i_frame = qq( ); } else { $i_frame = $i_frame_alt; } ################## ## Save and done ################## __________________________________________________________ But there is a Problem: When you select the radio "NO" in CP >"General Display Settings">Inline Frame View of Topic on Reply Page? the Hack doesn't work. Because in ubb_lib_posting.cgi "sub build_topic_review" is only for ubb_new_reply.cgi: So can someone add a sub such as "sub pm_review" for ubb_pm.cgi in ubb_lib_posting.cgi? Thank you Very much! ###################################################### sub build_topic_review { local(@sort_topic, $total_posts, $summary, $row, $alt_color2, @posted, @user_profile, $listed_name, $this_user_number); @sort_topic = sort(@this_topic); $total_posts = @sort_topic; if (($total_posts > 26) || ($post_permiss eq "private")) { $summary = qq( $vars_wordlets{topic_review_link} ); } else { $summary = qq~ $TBT$vars_wordlets{topic_review} ~; $alt_color2 = "$vars_style{AltColumnColor2}"; foreach $row(@sort_topic) { if ($alt_color2 eq "$vars_style{AltColumnColor1}") { $alt_color2 = "$vars_style{AltColumnColor2}"; } else { $alt_color2 = "$vars_style{AltColumnColor1}"; } if ($row !~ /^A/) { @posted = split(/||/, $row); if (($posted[8] eq 'unreg') or ($posted[8] eq '')){ $listed_name = $posted[2]; } else { if ($posted[11] eq '') { # old post- we need to find user number $this_user_number = &GetUserNumber($posted[2]); if ((-e "$vars_config{MembersPath}/$this_user_number.cgi") && ($this_user_number ne '')) { @user_profile = &OpenProfile("$this_user_number"); } else { $user_profile[15] = $posted[2]; } } else { # already have user number if (-e "$vars_config{MembersPath}/$posted[11].cgi") { @user_profile = &OpenProfile("$posted[11]"); } else { $user_profile[15] = "$posted[10]"; chomp($posted[10]); } } chomp($user_profile[15]); if ($user_profile[15] ne '') { $listed_name = $user_profile[15]; } else { $listed_name = $posted[2]; } chomp($listed_name); } $summary .= qq~ $listed_name$posted[6] ~; } } $summary .= "$TBB "; } return($summary); }
Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Joined: May 2001
Posts: 1,042
Likes: 7
Very cool! I'll install this asap!
Joined: May 2001
Posts: 6,708
Member
Member
Joined: May 2001
Posts: 6,708
Good hack. It would be good if you could document it.
Joined: Jun 2001
Posts: 216
Member
Member
Joined: Jun 2001
Posts: 216
This didn't work for 6.1.0.3. So, i Edited it as follows: ############################# # Sleepy custom hack # # To view PM when replying # # ########################### # # Only 2 files need changing # # public_pm_form.pl & ubb_pm.cgi # ############################ ################### #OPEN public_pm_form.pl ################### #find ################### print <$TBB NearBottom ################# # replace with ################# print <$TBB $i_frame NearBottom ################# # save and exit ################# # open ubb_pm.cgi ################# # find ################# sub pm_reply { local (%pm_user_index, %pm_user_index_sent, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field); ################ # replace ################ sub pm_reply { local (%pm_user_index, %pm_user_index_sent, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, $i_frame, $i_frame_alt, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field); ############### # find (do this twice) ############### # get pm topic! if (-e "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi") { require "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi"; } else { &StandardHTML("$vars_wordlets_err{no_such_pm}"); } ############### #Below that ADD ############### # set topic viewer: $go_to = "$vars_config{CGIURL}/ultimatebb.cgi?ubb=get_pm&d=$in{d}&t=$in{t}"; $i_frame_alt = &build_topic_review; if ($vars_display{InlineFrame} eq 'TRUE') { $i_frame = qq( ); } else { $i_frame = $i_frame_alt; } ################## ## Save and done ################## __________________________________________________________ But there is a Problem: When you select the radio "NO" in CP >"General Display Settings">Inline Frame View of Topic on Reply Page? the Hack doesn't work. Because in ubb_lib_posting.cgi "sub build_topic_review" is only for ubb_new_reply.cgi: So can someone add a sub such as "sub pm_review" for ubb_pm.cgi in ubb_lib_posting.cgi? Thank you Very much! ###################################################### See original hack at top of forum for further information, i didn't need to continue past this point.
Joined: Dec 2001
Posts: 90
Member
Member
Joined: Dec 2001
Posts: 90
Cool! Now (not to downplay your work) someone just needs to make it so you can do things such as quote the PM you're replying to...just a thought No problems installing here! Thx!
can't find peace of mind but every corner's got a mcdonalds?!
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Posts:
21,080
Joined: March 2000
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614Nov 14th, 2025
Currently Online 346
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 23